﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="InfoList.ascx.cs" Inherits="Admin_Crimson_Controls_InfoList" %>

<script language="javascript" type="text/javascript">
<%--
   The follow method is called by Page TypeSelector.aspx
 --%>
    function setSelected(id, name) {
        $("#<%=HiddentSelectedTypeId.ClientID %>").val(id);
        $("#selectTypeHyperLink").text(name);
    }   
    $(document).ready(function(){
        $("#selectTypeHyperLink").click(function(){ClickThickBox('<%=ResolveUrl("TypeSelector.aspx?KeepThis=true&TB_iframe=true&height=400&width=600")%>');})       ;
    });
    
</script>

<div class="toolbar" style="height: 20px">
    <asp:Label ID="LabelSelectType" runat="server">类型：</asp:Label>
    <input type="text" id="HiddentSelectedTypeId" runat="server" style="display: none" />
    <a id="selectTypeHyperLink">选择类型</a>
    <asp:LinkButton ID="Button1" runat="server" Text="查询" OnClick="Button1_Click" CssClass="iconButton search" />
</div>
<p>
    <asp:HyperLink ID="addHyperLink" runat="server" NavigateUrl="../NewsEditor.aspx"
        Text="新增" CssClass="iconButton infoAdd"></asp:HyperLink>
    &nbsp;<asp:LinkButton ID="LinkButtonDelete" runat="server" Text="删除" OnClick="DeleteSelected"
        OnClientClick="return confirm('是否删除已经选择的Info')" CssClass="iconButton infoDelete"></asp:LinkButton>
</p>
<div>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CssClass="dataGrid"
        AllowPaging="True" PageSize="15" OnPageIndexChanged="pageIndexChanged">
        <Columns>
            <asp:TemplateField>
                <ItemTemplate>
                    <input type="checkbox" id="CheckBox1" runat="server" value='<%# Bind("Id") %>' />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:HyperLinkField DataNavigateUrlFields="Id" DataNavigateUrlFormatString="../NewsEditor.aspx?id={0}"
                HeaderText="详细" Text="详细" />
            <asp:BoundField HeaderText="标题" DataField="Title" />
            <asp:BoundField HeaderText="类型" DataField="Type" />
            <asp:BoundField HeaderText="状态" DataField="State" />
            <asp:BoundField HeaderText="发布人" DataField="Publisher" />
            <asp:BoundField HeaderText="发布时间" DataField="CreateTime">            
            </asp:BoundField>
        </Columns>
        <EmptyDataTemplate>
            没有数据
        </EmptyDataTemplate>
    </asp:GridView>
</div>
